import request from '@/utils/request'

export function getFeedbackList(params) {
  return request({
    url: '/api/feedback/list',
    method: 'get',
    params,
    headers: {
      'Authorization': `Bearer ${localStorage.getItem('token')}`
    }
  })
}

export function createFeedback(data) {
  return request({
    url: '/api/feedback/create',
    method: 'post',
    data: {
      survey_name: data.survey_name,
      class_id: data.class_id
    },
    headers: {
      'Authorization': `Bearer ${localStorage.getItem('token')}`
    }
  })
}